#pragma once

#include "bdzhlog_global.h"

class QString;



class BDZHLOG_EXPORT Console
{
public:

	enum ColorMode
	{
		BLACK	= 0,
		NAVY	= 1,
		GREEN	= 2,
		TEAL	= 3,
		MAROON	= 4,
		PURPLE	= 5,
		OLIVE 	= 6,
		SILVER	= 7,
		GRAY	= 8,
		BLUE 	= 9,
		LIME	= 10,
		AQUA	= 11,
		RED		= 12,
		FUCHSIA	= 13,
		YELLOW	= 14,
		WHITE	= 15
	};


private:
	Console(void);
	~Console(void);
public:
	static void create(char* szTitle = ("Console"));
	static void destroy(void);

	static void show(void);
	static void hide(void);

	static void setTitle(char* szText, ...);

	static void setColor(unsigned short wAttributes = 15);
	static void setColor(ColorMode foreground, ColorMode background);

	static void clear(void);

	static void write(const char* szText);

	static void write(const QString& text, ColorMode foreground = Console::WHITE);

	static void writeDebug(const QString& text, ColorMode foreground = Console::WHITE);

	static void writeWarning(const QString& text, ColorMode foreground = Console::RED);

	static void writeCritical(const QString& text, ColorMode foreground = Console::RED);

	static void writeFatal(const QString& text, ColorMode foreground = Console::RED);

	static void writeTrack(const QString& text, ColorMode foreground = Console::BLUE);
	static void writeTrackWithThreadId(const QString& text, ColorMode foreground = Console::BLUE);
};

//////////////////////////////////////////////////////////////////////////

